<?php

namespace App\Http\Controllers\Api;

use App\Service\Model\Banners;
use App\Service\Model\Notice;
use Illuminate\Http\Request;
use App\Service\Model\AppVersion;

class ConfigController extends BaseController
{

    /**
     * banner图片
     * 
     * @return void
     */
    public function banners(){
        $banner = Banners::where('status',1)->orderBy('sort','asc')->get()->toArray();
        $text   = Notice::find(1);
        return $this->success(['banner'=>$banner,'text'=>$text]);
    }

    /**
     * app强制更新
     * 
     * @param Request $request
     * @return void
     */
    public function appUpdate(Request $request){
        $data = AppVersion::where('status',1)->orderBy('id','desc')->first();
        return $this->success($data);
    }

    

}